<template>
  <div>
      <el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
        <el-menu-item index="2">
          <i class="el-icon-menu"></i>
          <span slot="title">导航二</span>
        </el-menu-item>
      </el-menu>
  </div>
</template>

<script setup lang="ts">
const handleOpen = (key: any, keyPath: any) => {
  console.log(key, keyPath);
};
const handleClose = (key: any, keyPath: any) => {
  console.log(key, keyPath);
}
</script>

<style scoped></style>